﻿using System;

namespace PropertyChanges
{
    class TestPropertyChangesTask
    {
        static void Main(string[] args)
        {
            Person person = new Person();

            person.PropertyEventHandler += new PropertyChangedEventHandler(Person_PropertyChanged);


            person.FirstName = "Mihail";
            //person.LastName = "Vladov";
            //person.Gender = Genders.Male;
            //person.DateOfBirth = DateTime.Today;

            //Console.WriteLine(new string('-',50));

            //person.FirstName = "Pesho ";
            //person.LastName = "Kelesho";

            
        }

        static void Person_PropertyChanged(object sender, PropertyChangedEventArgs args)
        {
            Console.WriteLine("Person_PropertyChanged() event called.");
        }
    }
}
